﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:cal="http://www.caliburnproject.org"
             xmlns:ctrl="clr-namespace:MediaOwl.Common.ControlTemplates;assembly=MediaOwl.Common"
             x:Class="MediaOwl.LastFm.Views.MusicTagHomeView"
             mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="400">
    <i:Interaction.Triggers>
        <i:EventTrigger>
            <cal:ActionMessage MethodName="FetchTagData" />
        </i:EventTrigger>
    </i:Interaction.Triggers>
    <ctrl:WorkitemControl BusyContext="{Binding CurrentBusyViewModel}"
                          DialogContext="{Binding ActiveDialog}">
        <toolkit:DockPanel Margin="5">
            <ListBox x:Name="TopTags"
                     ItemTemplate="{StaticResource TagItemTemplate}"
                     d:LayoutOverrides="Height"
                     toolkit:DockPanel.Dock="Top"
                     ItemsPanel="{StaticResource WrappingItemsPanelTemplate}"
                     ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                     Style="{StaticResource InvisibleListBoxStyle}"
                     SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="SelectionChanged">
                        <cal:ActionMessage MethodName="Open" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </ListBox>

        </toolkit:DockPanel>
    </ctrl:WorkitemControl>
</UserControl>
